import request from "@/utils/request"
import qs from 'qs'
export function queryRolePage (data) {
	return request({
		url: "/user/queryRolePage",
		method: "get",
		params: data
	})
}
export function queryOneRole (data) {
	return request({
		url: "/user/queryOneRole",
		method: "get",
		params: data
	})
}
export function updateRole (data) {
	return request({
		url: "/user/updateRole",
		method: "post",
    data: data
	})
}
export function updateRoleInfo (data) {
	return request({
		url: "/user/updateRoleInfo",
		method: "post",
    data: data
	})
}
export function insertRole (data) {
	return request({
		url: "/user/insertRole",
		method: "post",
    data: data
	})
}
export function deleteRole (data) {
	return request({
		url: "/user/deleteRole",
		method: "post",
    data: data
	})
}



// 新增或更新角色App权限 POST /bRoleToApp/insertOrUpdateBRoleToApp
export function insertOrUpdateBRoleToApp (data) {
	return request({
		url: "/bRoleToApp/insertOrUpdateBRoleToApp",
		method: "post",
		data
	})
}

// 新增或更新角色App权限 POST /bRoleToApp/insertOrUpdateBRoleToApp
export function queryListBRoleToApp (data) {
	return request({
		url: "/bRoleToApp/queryListBRoleToApp",
		method: "get",
		// headers: {
		//   'content-type': 'application/x-www-form-urlencoded'
		// },
		params: data
	})
}

// /lDevice/queryConfigurableDevice

export function queryConfigurableDevice (data) {
	return request({
		url: "/lDevice/queryConfigurableDevice",
		method: "get",
		params: data
	})
}

// /deviceSet/queryPageDevice   ---6.10

export function queryPageDevice (data) {
	return request({
		url: "/deviceSet/queryPageDevice",
		method: "get",
		params: data
	})
}

// /bRoleToApp/queryListBRoleToDevice

export function queryListBRoleToDevice (data) {
	return request({
		url: "/bRoleToDevice/queryListBRoleToDevice",
		method: "get",
		params: data
	})
}

// /bRoleToDevice/insertBRoleToDevice
export function insertBRoleToDevice (data) {
	return request({
		url: "/bRoleToDevice/insertBRoleToDevice",
		method: "post",
		data
	})
}

export function queryRoleBindMen (data) {
	return request({
		url: "/user/queryRoleBindMen",
		method: "get",
    params: data
	})
}
export function insertRoleBindMenButton (data) {
	return request({
		url: "/user/insertRoleBindMenButton",
		method: "post",
		data
	})
}
